package models

import (
	"time"
)

type StockBasic struct {
	ID         int       `json:"id" gorm:"column:id;primaryKey"`
	TsCode     string    `json:"ts_code" gorm:"column:ts_code;uniqueIndex"`
	Symbol     string    `json:"symbol" gorm:"column:symbol;uniqueIndex"`
	Name       string    `json:"name" gorm:"column:name"`
	Area       string    `json:"area" gorm:"column:area;index"`
	Industry   string    `json:"industry" gorm:"column:industry;index"`
	Fullname   string    `json:"fullname" gorm:"column:fullname"`
	Enname     string    `json:"enname" gorm:"column:enname"`
	Cnspell    string    `json:"cnspell" gorm:"column:cnspell"`
	Market     string    `json:"market" gorm:"column:market;index"`
	Exchange   string    `json:"exchange" gorm:"column:exchange"`
	CurrType   string    `json:"curr_type" gorm:"column:curr_type"`
	ListStatus string    `json:"list_status" gorm:"column:list_status;index"`
	ListDate   time.Time `json:"list_date" gorm:"column:list_date"`
	DelistDate time.Time `json:"delist_date" gorm:"column:delist_date"`
	IsHs       string    `json:"is_hs" gorm:"column:is_hs"`
	ActName    string    `json:"act_name" gorm:"column:act_name"`
	ActEntType string    `json:"act_ent_type" gorm:"column:act_ent_type"`
	UpdatedAt  time.Time `json:"updated_at" gorm:"column:updated_at"`
}

func (StockBasic) TableName() string {
	return "stock_basic"
}
